import axios from 'axios';

let base = 'http://127.0.0.1:8000';
// 登录
export const login = params => { return axios.get(`${base}/login/`, {params:params}).then(res => res); };
// 发送验证码
export const Send_code = params => { return axios.get(`${base}/sendphone/`, {params:params}).then(res => res); };
// 注册
export const Reg = params => { return axios.get(`${base}/reg/`, {params:params}).then(res => res); };
// 获取Email
export const Get_email = params => { return axios.get(`${base}/getmessage/`, {params:params}).then(res => res); };
// 发送确认邮件
export const Send_find = params => { return axios.get(`${base}/phoneFind/`, {params:params}).then(res => res); };
// 确认手机code是否正确
export const Find_qery = params => { return axios.post(`${base}/phoneFind/`, params).then(res => res); };
// 修改密码
export const Change_password = params => { return axios.get(`${base}/changepassword/`, {params:params}).then(res => res); };
// 发送邮件
export const Send_email = params => { return axios.get(`${base}/emailFind/`, {params:params}).then(res => res); };
// 确认邮箱code是否正确
export const Email_qery = params => { return axios.post(`${base}/emailFind/`, params).then(res => res); };
// 获取超级管理员看到的用户
export const Get_Users = params => { return axios.get(`${base}/users/`, {params:params}).then(res => res); };
// 审批用户 
export const Change_Users = params => { return axios.post(`${base}/users/`, params).then(res => res); };
// 获取所有权限
export const GetPer = params => { return axios.get(`${base}/addUser/`, {params:params}).then(res => res); };
// 添加用户 
export const Add_Users = params => { return axios.post(`${base}/addUser/`, params).then(res => res); };
// 获取货物类型
export const GetCargo = params => { return axios.get(`${base}/cargo/`, {params:params}).then(res => res); };
// 获取货物类型和user
export const UserCargo = params => { return axios.get(`${base}/user_cargo/`, {params:params}).then(res => res); };
// 添加标签
export const AddTags = params => { return axios.post(`${base}/tags/`, params).then(res => res); };
// 获取所有标签
export const ShowTags = params => { return axios.get(`${base}/tags/`, {params:params}).then(res => res); };
// 添加客户
export const AddCustomer = params => { return axios.post(`${base}/customer/`, params).then(res => res); };
// 获取所有客户
export const ShowCustomer = params => { return axios.get(`${base}/customer/`, {params:params}).then(res => res); };
// 客户用户 
export const DelCustomer = params => { return axios.delete(`${base}/customer/`, {params:params}).then(res => res); };
// 添加运单列表
export const AddSign = params => { return axios.post(`${base}/consignmentList/`, params).then(res => res); };
// 获取所有运单
export const ShowSign = params => { return axios.get(`${base}/consignmentList/`, {params:params}).then(res => res); };
// 删除订单
export const DelSign = params => { return axios.delete(`${base}/consignmentList/`, {params:params}).then(res => res); };
// 获取所有运单
export const ShowDet = params => { return axios.get(`${base}/consignmentDet/`, {params:params}).then(res => res); };
// 添加货物类型
export const AddCargo = params => { return axios.post(`${base}/cargo/`, params).then(res => res); };
// 获取所有地址
export const ShowAddr = params => { return axios.get(`${base}/phy/`, {params:params}).then(res => res); };
// 添加货物类型
export const ShowSignDet = params => { return axios.post(`${base}/phy/`, params).then(res => res); };
// 获取单个信息
export const ShowOneSign = params => { return axios.get(`${base}/temp/`, {params:params}).then(res => res); };
// 获取总览订单
export const ShowTotalSign = params => { return axios.get(`${base}/totalsign/`, {params:params}).then(res => res); };

